export const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        component: () => import('../view/Login.vue')
    },
    {
        path: '/register',
        component: () => import('../view/Register.vue')
    },
    {
        path: '/app',
        component: () => import('../components/AppLayout.vue'),
        children: [
            {
                path: '',
                redirect: '/dashboard'
            },
            {
                path: 'dashboard',
                component: () => import('../view/Dashboard.vue')
            },
            {
                path: 'user/list',
                component: () => import('../view/UserList.vue')
            },
            {
                path: 'user/manage',
                component: () => import('../view/UserManagement.vue')
            },
            {
                path: 'role',
                component: () => import('../view/RoleManagement.vue')
            },
            {
                path: 'permission/control',
                component: () => import('../view/PermissionControl.vue')
            },
            {
                path: 'system/settings',
                component: () => import('../view/SystemSettings.vue')
            },
            {
                path: 'system/logs',
                component: () => import('../view/LogManagement.vue')
            },
            {
                path: 'article',
                component: () => import('../view/ArticleManagement.vue')
            },
            {
                path: 'file',
                component: () => import('../view/FileManagement.vue')
            }
        ]
    },
    // 重定向路由，保持原有路径兼容性
    {
        path: '/dashboard',
        redirect: '/app/dashboard'
    },
    {
        path: '/user/list',
        redirect: '/app/user/list'
    },
    {
        path: '/user/manage',
        redirect: '/app/user/manage'
    },
    {
        path: '/role',
        redirect: '/app/role'
    },
    {
        path: '/permission/control',
        redirect: '/app/permission/control'
    },
    {
        path: '/system/settings',
        redirect: '/app/system/settings'
    },
    {
        path: '/system/logs',
        redirect: '/app/system/logs'
    },
    {
        path: '/article',
        redirect: '/app/article'
    },
    {
        path: '/file',
        redirect: '/app/file'
    }
];